<html>
<body>
Reports calls to <code>Arrays.asList()</code> with at most one argument.
<p>
  Such calls could be replaced
  with <code>Collections.singletonList()</code>, <code>Collections.emptyList()</code>,
  or <code>List.of()</code> on JDK 9 and later, which will save some memory.</p>
<p>In particular, <code>Collections.emptyList()</code> and <code>List.of()</code> with no arguments
  always return a shared instance,
  while <code>Arrays.asList()</code> with no arguments creates a new object every time it's called.</p>
<p>Note: the lists returned by <code>Collections.singletonList()</code> and <code>List.of()</code> are immutable,
while the list returned <code>Arrays.asList()</code> allows calling the <code>set()</code> method.
This may break the code in rare cases.</p>
<p><b>Example:</b></p>
<pre><code>
  List&lt;String&gt; empty = Arrays.asList();
  List&lt;String&gt; one = Arrays.asList("one");
</code></pre>
<p>After the quick-fix is applied:</p>
<pre><code>
  List&lt;String&gt; empty = Collections.emptyList();
  List&lt;String&gt; one = Collections.singletonList("one");
</code></pre>
<!-- tooltip end -->
<p>
</body>
</html>